/*
 * @Author: hrg
 * @Date: 2023-05-17 14:58:16
 * @LastEditTime: 2023-05-18 16:31:36
 * @FilePath: \study_go\study04\demo\main.go
 * @Description:
 */
package main

import "fmt"

/*
	结构体是用户单独定义的类型，和其他类型转换时需要有完全相同的字段（名字，个数，类型）
*/

type student1 struct {
	Age int
}
type stu1 student1

func main() {
	var a1 student1 = student1{101}
	var a2 stu1 = stu1{101}
	// 需要强制类型转换
	a1 = student1(a2)
	fmt.Println(a1)
	fmt.Println(a2)
}
